from locust import HttpLocust, TaskSet, task

class WebsiteTasks(TaskSet):
    def on_start(self):
        # self.client.post("/user/check_login", {
        #     "username": "18511995224",
        #     "password": "aaaaaa"
        # })
        self.client.get("/appschool/getXKMajorList")

    @task
    def index(self):
        self.client.get("/appschool/getXKSiteList")

    @task
    def index2(self):
        self.client.get("/appschool/getSchoolList")


    # ddd

    # @task
    # def index(self):
    #     self.client.get("/school/school_list")

    # @task
    # def about(self):
    #     self.client.get("/tk/tk_major_list")

    # @task
    # def user_center(self):
    #     self.client.get("/user/user_center")

    # @task
    # def school_info(self):
    #     self.client.get("/school/school_info?id=119")



class WebsiteUser(HttpLocust):
    task_set = WebsiteTasks
    min_wait = 5000
    max_wait = 15000
